/**
 * @Desc 统计分析 & 绑定域名交换机 页面集合 
 **/
import axios from './middleware'

export default {
    //查询域名下交换机
	fetchDomainSwitchList (params) { 
        let uri = '/customer/domain/switch/query';  
        let config = {
            params
        }
		return axios.get(uri, config);
    },
    //查询交换机数据  
    queryDomainSwitchData(params){
        let uri = '/customer/netdata/query';  
        let config = {
            params
        }
		return axios.get(uri, config); 
    },
    //新增
    createDomainSwitch(params){
        let uri = '/customer/domain/switch/add';   
		return axios.post(uri, params); 
    },
    //修改
    putDomainSwitch(params){
        let uri = '/customer/domain/switch/edit';   
		return axios.post(uri, params); 
    },
    //删除
    deleteDomainSwitch(params){
        let uri = '/customer/domain/switch/del';  
        let config = {
            params
        }
		return axios.get(uri, config); 
    },
    //查询客户下的域名
	fetchCustomerRelateDomain (params) {
        let uri = `/customer/domain/list?page=1&pagesize=10000&orderby=id&order=desc&customer_id=${params.customer_id || ''}`;  
        // let new_params = Object.assign({}, {
        //     page: 1,
        //     pagesize: 10000,
        //     orderby: 'id',
        //     order: 'desc'
        // }, params)         
        // console.log(new_params)
        // let config = {
        //     new_params
        // }
		return axios.get(uri);
    },   
    //查询交换机汇聚口
    querySwitchIndexes(params){
        let uri = '/switch/indexes';  
        let config = {
            params
        }
		return axios.get(uri, config); 
    },
} 
